<?php /* Smarty version 2.6.26, created on 2013-04-22 14:58:57
         compiled from tmoncell_updatef.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'tmoncell_updatef.html', 494, false),array('function', 'html_options', 'tmoncell_updatef.html', 518, false),)), $this); ?>
<?php echo '<?xml'; ?>
 version="1.0" encoding="utf-8"<?php echo '?>'; ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<title>コントロールパネル</title>
		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
		<link rel="stylesheet" href="./assets/styles/ui-lightness/ui.all.css" type="text/css" />
		<script src="assets/scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
		<script src="assets/scripts/jquery-ui-1.7.3.custom.min.js" type="text/javascript"></script>
		<script src="assets/scripts/ui/ui.dialog.js" type="text/javascript"></script>
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		<script src="assets/scripts/table.js" type="text/javascript"></script>
		<script type="text/javascript" src="./assets/scripts/editor.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.datepicker.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.core.js"></script>
		<script type="text/javascript" src="./assets/scripts//table.js"></script>
		<link rel="stylesheet" href="./assets/styles/cellgrid.css" type="text/css" />
		<style type="text/css">
		.manage{display:block}
		.cost{display:none}
		.benefit{display:none}
input,
.text{
	*font-family: "MS Pゴシック","ＭＳ Ｐゴシック","MS P Gothic";
	line-height:120%;
	height:25px;
	width:96%;
}
	.texthead,
	textarea {
		*font-family: "MS Pゴシック","ＭＳ Ｐゴシック","MS P Gothic";
		line-height:120%;
		height:25px;
		width:96%;
	}
	select{
		width:96%;
	}
		</style>
		<script type="text/javascript">
	    function rObj(map, saletickt) {
	        this.map = map;
	        this.saletickt = saletickt;
	    }
	 //   array("map" => $v["map"], "saletickt"=> $v["saletickt"], "exp_ins_flg"=>  $v["exp_ins_flg"] );
		var map_disp = new Array();
		<?php $_from = $this->_tpl_vars['title_map']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kk'] => $this->_tpl_vars['vv']):
        $this->_foreach['member']['iteration']++;
?>
		map_disp["<?php echo $this->_tpl_vars['kk']; ?>
"] = new rObj("<?php echo $this->_tpl_vars['vv']['map']; ?>
", "<?php echo $this->_tpl_vars['vv']['saletickt']; ?>
" );
		<?php endforeach; endif; unset($_from); ?>
		var maptype = new Array();
		<?php $_from = $this->_tpl_vars['aokimapsort']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kk'] => $this->_tpl_vars['vv']):
        $this->_foreach['member']['iteration']++;
?>
		maptype[<?php echo $this->_tpl_vars['kk']; ?>
] = "<?php echo $this->_tpl_vars['vv']; ?>
";
		<?php endforeach; endif; unset($_from); ?>
		
		var g_p_nums = new Array();
		<?php $_from = $this->_tpl_vars['pattern_nums']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kk'] => $this->_tpl_vars['vv']):
        $this->_foreach['member']['iteration']++;
?>
			g_p_nums["<?php echo $this->_tpl_vars['vv']['shop_cd']; ?>
_<?php echo $this->_tpl_vars['vv']['pattern_cd']; ?>
"] = <?php echo $this->_tpl_vars['vv']['nums']; ?>
;
		<?php endforeach; endif; unset($_from); ?>
		
		var sp_map =new Array();
		<?php $_from = $this->_tpl_vars['shopmapno']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kk'] => $this->_tpl_vars['vv']):
        $this->_foreach['member']['iteration']++;
?>
		sp_map["<?php echo $this->_tpl_vars['kk']; ?>
"] = [ '<?php echo $this->_tpl_vars['vv']['r']; ?>
', '<?php echo $this->_tpl_vars['vv']['i']; ?>
', '<?php echo $this->_tpl_vars['vv']['m4']; ?>
','<?php echo $this->_tpl_vars['vv']['m5']; ?>
','<?php echo $this->_tpl_vars['vv']['l1']; ?>
', '<?php echo $this->_tpl_vars['vv']['l2']; ?>
', '<?php echo $this->_tpl_vars['vv']['l3']; ?>
', '<?php echo $this->_tpl_vars['vv']['l4']; ?>
', '<?php echo $this->_tpl_vars['vv']['l5']; ?>
'  ];
		<?php endforeach; endif; unset($_from); ?>
		$(function() {
			$('.message').fadeIn("slow");
			//*******************
			$("#disp_td").live('change',function(){
				set_disp_td($(this).val());
			});
			$(".titlebase").live('change',function(){
				var id = $(this).attr("id") ;
				var index = id.split("_")[1] * 1 ;
				
				sum_all(index);
				
				var shop_cd = $("#sp" + index).val() ; 
				var vid = $(this).val();
				var shop_map = "";
				var shop_map_type = "";
				var isregyu = "";
				$("#mps_" + index).html("");
				$("#mpno_" + index).attr("value", "");
				$("#isirgyu_"  + index).attr("value", "");
				var mapflg = true;
				if (map_disp[vid]!=null) {
					isregyu = map_disp[vid].map;
					if (isregyu == 1) {
						shop_map = sp_map[shop_cd][0];
						shop_map_type = maptype[1];
					} else if (isregyu == 2) {
						shop_map = sp_map[shop_cd][1];
						shop_map_type = maptype[2];
					} else if (isregyu == 4) {
						shop_map = sp_map[shop_cd][2];
						shop_map_type = maptype[4];
					} else if (isregyu == 5) {
						shop_map = sp_map[shop_cd][3];
						shop_map_type = maptype[5];
					}
					
					if  ( shop_map == "" ) {
						alert("マップNOは存在しないので、選択できできません。");
						$(this).val("");
						mapflg =  false;
					}else {
						$("#mps_" + index).html( "( " +shop_map_type + "&nbsp;" + shop_map  + " )" ) ;
						$("#mpno_"  + index).attr("value", shop_map);
						$("#isirgyu_"  + index).attr("value", map_disp[vid].map);
					}
				}
				//子店舗
				if  ($(this).attr("ref") ) {
					var titlename  = "";
					var mpsdisp   = "";
					if (mapflg && shop_map) {
						titlename = $(this).find('option:selected').text();
						mpsdisp   =  "( " + shop_map_type + "&nbsp;" + shop_map  + " )" 
					}
					var sub_title_class = $(this).attr("ref");
					var groupNo = sub_title_class.split("_")[1] ;
					
					$(".t_" + groupNo).each(function(){
						$(this).attr("value", vid);
					});
					$(".tm_" + groupNo).each(function(){
						$(this).attr("value", titlename);
					});
					$(".mps_" + groupNo).each(function(){
						$(this).html( mpsdisp ) ;
					});
					
					$(".mp_" + groupNo).each(function(){
						$(this).attr("value",shop_map);
					});
					
					$(".is_" + groupNo).each(function(){
						$(this).attr("value", isregyu);
					});
					
					
				}
				return "";
			});
			
			$(".spattern").live('change',function(){
				var val = $(this).val();
				var id = $(this).attr("id");
				var index = id.split("_")[2] * 1;
				theID = "n" + id;
				var nums = "";
				if (val == "" ) {
					$('#'+ theID ).val("");
				} else {
					nums = getPNums($('#fm [name^=shop_cd]').eq(index).attr("value"),val) 
					$('#'+ theID ).val(nums);
				}
			});
			
			$(".celltext").live('change',function(){
				var id = $(this).attr("id");
				var index = id.split("_")[2] * 1;
				sum_all(index);
				//子店舗
					if  ( $(this).attr("ref") ) {
						var val = $(this).val();
						var group_class = $(this).attr("ref");
						
						$("." + group_class).each(function(){
							$(this).attr("value", val);
						});
					}
				});
				
			$('.btn_save').live('click',function(){
				if( confirm('更新してよろしいですか？') ){
					document.fm.target = "i_frame";
					document.fm.mode.value = 'input';
					document.fm.submit();
				}
			});
			
			$('a.tddel').live('click',function(){
				$('#rtr_' + $(this).attr("id") ).remove();
				$(this).closest('tr').remove();
			});

		});
		function checkTitle (index){
			var titleFlag = false;
			if  ( $("#tx_" +index).val() != "" ) {
				titleFlag = true;
			}
<?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
 <?php $this->assign('jj', ($this->_foreach['csets']['iteration']-1)); ?>
 			if  ( $("#t<?php echo $this->_tpl_vars['jj']; ?>
_" + index ).val() != "" ) {
				if (titleFlag) {
					return false;
				}
				titleFlag = true;
			}
<?php endforeach; endif; unset($_from); ?>
			return true;
		}
	function getPNums(shopcd,patterncd) {
		var vid =  shopcd + "_" + patterncd;
		if (vid in g_p_nums) {
			return g_p_nums[vid];
		}
		return "";
	}
	
	function hpa() {
		$("#pop_cp").hide();
		ginnerdiv = false;
	}
	function spa(val, text) {
		hpa();
		
		$("#"+gpatt_id).attr("value", text);
		
		var id  = gpatt_id.replace("nm", "")
		$("#" + id).attr("value", val);
		var index = id.split("_")[2] * 1;
		theID = "n" + id;
		var nums = "";
		
		if (val != "" ) {
			nums = getPNums($('#fm [name^=shop_cd]').eq(index).attr("value"),val) ;
		}
		
		$('#'+ theID ).val(nums);
		
		if ( $("#"+gpatt_id).attr("ref")) {
			var groupNo = $("#"+gpatt_id).attr("ref");
			$(".pm"  + groupNo).each(function(){
				$(this).attr("value", text);
			});
			$(".p" + groupNo).each(function(){
				$(this).attr("value", val);
			});
		}
	}
	var gpatt_id = null;
	var ginnerdiv = false;
	$(function(){
		$('.pnm').focus(function(){
			disppattern( $(this), "#pop_tp");
		});
		
		$('.pnq').focus(function(){
			disppattern( $(this), "#pop_qp");
		});
		document.onclick=function(e){ 
			var e=e?e:window.event; 
			var tar = e.srcElement||e.target; 
			if (!ginnerdiv) {
				if ( ( $(tar).attr("class") != "pnm") && ( $(tar).attr("class") != "pnq") ){ 
					hpa();
				} 
			}
		} 
	    $("#pop_cp").live("mouseenter",function(){
	    	ginnerdiv = true;
	    });
	    $("#pop_cp").live("mouseleave",function(){
	    	ginnerdiv = false
	    });
	    

	});
	function disppattern(obj, val) {
		$('#pop_cp').html($(val).html() )
		var offset =  obj.offset();
		gpatt_id   =  obj.attr("id");
		var top = offset.top + obj.height() + 5 ;
		var bottom = document.body.scrollTop+document.body.clientHeight;
		if  (top + 350 >bottom) {
			top = bottom - 350;
		}
		var left  = offset.left + obj.width() - 380 ; 
		$('#pop_cp').css({
				'display':'block',
				'top': top +'px',
				'left':left+'px',
				'position':'absolute'
		});
	}
	function jumpl(val) {
		$('#rdiv').scrollLeft(val);
		//var txtop = $("#rdiv").offset().top;
		//$('#rdiv').scrollTo(txtop, 200 )
	}
	
	function reshow(idv) {
		//var txleft = $("#rdiv").offset().left;
		//alert(txleft);
		// $("#rdiv").offset({left:100});
		//$("#" + idv).css({ "left:" + txleft });
	}
	function dorscroll(){
		document.getElementById('rdiv').scrollLeft=this.scrollLeft;
	}
	var disp_css = 1;
	function set_disp_td(val) {
		var disp = new Array(4) ;   
		disp[1] = ".manage";
		disp[2] = ".cost";
		disp[3] = ".benefit";
		var val_index = val * 1;
		for (i=1;i<=3;i++) {
			if  (i!=val_index) {
				$( disp[i] ).css("display", "none");
			}
		}
		$( disp[val_index] ).css("display", "block");
	}
	//サイズ単価
	var gssp =new Array();
	<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kk'] => $this->_tpl_vars['vv']):
        $this->_foreach['member']['iteration']++;
?>
 <?php $this->assign('i', ($this->_foreach['member']['iteration']-1)); ?>
 gssp[<?php echo $this->_tpl_vars['i']; ?>
] =  [ <?php echo $this->_tpl_vars['vv']['b2']; ?>
, <?php echo $this->_tpl_vars['vv']['b3']; ?>
, <?php echo $this->_tpl_vars['vv']['b4']; ?>
,<?php echo $this->_tpl_vars['vv']['ratio']; ?>
 ];
	<?php endforeach; endif; unset($_from); ?>
	
	function gNum(val){
		if (isNaN(val)){
			return 0;
		}else {
			return val * 1;
		}
	}
	
	///見込チラシ経費
	function sum_qrs(i){
		var b2 = gNum( $("#smpc_b2_"+ i).val() ) + gNum( $("#npc_b2_"+ i ).val() );
		var b3 = gNum( $("#smpc_b3_"+ i).val() ) + gNum( $("#npc_b3_"+ i ).val() );
		var b4 = gNum( $("#smpc_b4_"+ i).val() ) + gNum( $("#npc_b4_"+ i ).val() );
		
		<?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
			 b2 = b2 +  gNum( $("#<?php echo $this->_tpl_vars['cv']['smpc_b2']; ?>
_"+ i).val() ) + gNum( $("#<?php echo $this->_tpl_vars['cv']['npc_b2']; ?>
_"+ i ).val() );
			 b3 = b3 +  gNum( $("#<?php echo $this->_tpl_vars['cv']['smpc_b3']; ?>
_"+ i).val() ) + gNum( $("#<?php echo $this->_tpl_vars['cv']['npc_b3']; ?>
_"+ i ).val() );
			 b4 = b4 +  gNum( $("#<?php echo $this->_tpl_vars['cv']['smpc_b4']; ?>
_"+ i).val() ) + gNum( $("#<?php echo $this->_tpl_vars['cv']['npc_b4']; ?>
_"+ i ).val() );
		<?php endforeach; endif; unset($_from); ?>
		var suma = 0;
		
		if (b2 != 0) {
			//alert(b2)
			suma = b2 * gssp[i][0] * gssp[i][3];
		}
		if (b3 != 0) {
			suma = suma + b3* gssp[i][1] * gssp[i][3];
		}
		if (b4 != 0) {
			alert(b4)
			suma = suma + b4* gssp[i][2] * gssp[i][3];
		}
		return suma.toFixed(2);
		 
	}
	function sum_row(i){
		//費用計算
		var area = $("#zac1_" + i ).html() ;
		if (!(area)) {
			area = 0;
		}
		//チラシ費用
		var qrs =  sum_qrs(i); 
		$("#zqc1_" + i ).html(qrs);
		
		// 本年見込 
		var nowyear = qrs*1 + area * 1;
		$("#zkc1_" + i ).html( nowyear );
		
		//計画
		var plane = $("#zkc2_" + i ).html() * 1;
		//前年
		var lastyear = $("#zkc3_" + i ).html() * 1;
		
		//計画差   本年見込 - 計画 
		$("#zqc2_" + i ).html( nowyear - plane ) 
		//計画比   本年見込 / 計画
		if  ( plane != 0 ) {
			$("#zac2_" + i ).html( (100*nowyear / plane).toFixed(2) ) ;
		}
		//前年差   本年見込 - 前年
		$("#zqc3_" + i ).html( nowyear - lastyear ) 
		//前年比   本年見込 / 前年
		if  ( lastyear != 0 ) {
			$("#zac3_" + i ).html( (100*nowyear / lastyear).toFixed(2) );
		}
		//利益見込
		var nowqua   = $("#zkm1_" + i ).html() * 1;
		var planequa = $("#zkm2_" + i ).html() * 1;
		var lastqua  = $("#zkm3_" + i ).html() * 1;
		//利益本年
		$("#zkb1_" + i ).html( nowqua   - nowyear ) ;
		//利益計画
		$("#zkb2_" + i ).html( planequa - plane ) ;
		//利益前年
		$("#zkb3_" + i ).html( lastqua  - lastyear ) ;
	}
	//見込、計画、前年経費計算
	function sum_head(){
		//チラシ合計
		var su_qira = 0;
		$(".qira" ).each(function(){
			su_qira = su_qira + $(this).html() * 1;
		});
		$("#su_qira").html( su_qira ); 
		//地域広告 合計
		var su_qiar = 0;
		$(".qiar" ).each(function(){
			su_qiar = su_qiar + $(this).html() * 1;
		});
		$("#su_area").html( su_qiar ); 
		//見込計
		var su_all = su_qira +su_qiar * 1;
		$("#su_all").html( su_all ); 
		
		//計画計
		var su_psum = 0;
		$(".plco" ).each(function(){
			su_psum = su_psum + $(this).html() * 1;
		});
		$("#su_psum").html(su_psum)
		//計画差異
		//var su_psum =  $("#su_psum").html() * 1
		$("#su_pdec").html( su_all - su_psum ); 
		
		//計画比
		if (su_psum != 0) {
			$("#su_pper").html( ( 100* su_all / su_psum).toFixed(2) ); 
		} else {
			$("#su_pper").html( 0 ); 
		}
		//前年計
		var su_lsum = 0;
		$(".lsco" ).each(function(){
			su_lsum = su_lsum + $(this).html() * 1;
		});
		$("#su_lsum").html(su_lsum)
		//前年差異
		//var su_lsum =  $("#su_lsum").html() * 1
		$("#su_ldec").html( su_all - su_lsum ); 
		
		//前年比
		if (su_lsum != 0) {
			$("#su_lper").html( ( 100* su_all / su_lsum).toFixed(2) ); 
		}else{
			$("#su_lper").html( 0 ); 
		}
	}
	function sum_all(i){
		 sum_row(i);
		 sum_head();
	}
	function load_sum_all(){
		
		var shops   = document.getElementsByName( 'shop_cd[]');
		$.each(shops, function(i,val){
			sum_row(i);
		}); 
		
		 sum_head();
	}
	//費用計算
	window.onload = load_sum_all ; 
		</script>
	</head>
<body id="">
<?php echo $this->_tpl_vars['menu']; ?>

<?php echo $this->_tpl_vars['logout']; ?>

		<div id="container"><div class="wrapper">
			<h2>印刷手配管理</h2>
			<ul class="submenu clearfix">
				<li><a href="tmoncell_index.php">月間.セール明細情報一覧</a></li>
				<?php if (! $this->_tpl_vars['isG23']): ?><li><a href="tmoncell_form.php">月間.セール明細情報登録</a></li><?php endif; ?>
				<li>月間.セール明細情報更新</a></li>
				<?php if (! $this->_tpl_vars['isG23']): ?><li><a href="tmoncellprn_index.php">印刷部数明細</a></li><?php endif; ?>
				<li><a href="tmoncellshop_index.php">店舗実施一覧表</a></li>
			</ul>
			<h3>月間.セール明細情報更<?php if ($this->_tpl_vars['phase'] == 'complete'): ?>完了<?php endif; ?></h3>
<?php if ($this->_tpl_vars['phase'] == 'input'): ?>
<p class="message">内容</p>
<form name="fm" id = "fm" action="tmoncell_updatesubmit.php" method="post">
<p>
	<b>週名 ： 
	<?php echo $this->_tpl_vars['forms']['year4']; ?>
年度 &nbsp; <?php echo $this->_tpl_vars['forms']['week_cd']; ?>
週目 <?php if ($this->_tpl_vars['forms']['week_seq']): ?>  &nbsp; <?php echo $this->_tpl_vars['forms']['week_seq']; ?>
回<?php endif; ?>
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;配布日 : <?php echo $this->_tpl_vars['forms']['flier_date']; ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 ステータス : <?php echo $this->_tpl_vars['forms']['status']; ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最終更新日時 :<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['u_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y/%m/%d %H:%M") : smarty_modifier_date_format($_tmp, "%Y/%m/%d %H:%M")); ?>
</b>
	<input type="hidden" name="matrix_cd"  value="<?php echo $this->_tpl_vars['forms']['matrix_cd']; ?>
" />
	<input type="hidden" name="aja_cd"     value="<?php echo $this->_tpl_vars['forms']['aja_cd']; ?>
" />
	<input type="hidden" name="week_cd"    value="<?php echo $this->_tpl_vars['forms']['week_cd']; ?>
" />
	<input type="hidden" name="year4"      value="<?php echo $this->_tpl_vars['forms']['year4']; ?>
" />
	<input type="hidden" name="week_seq"   value="<?php echo $this->_tpl_vars['forms']['week_seq']; ?>
" />
	<input type="hidden" name="flier_date" value="<?php echo $this->_tpl_vars['forms']['status']; ?>
" />
	<input type="hidden" name="status"     value="<?php echo $this->_tpl_vars['forms']['flier_date']; ?>
" />
	<input type="hidden" name="u_time"     value="<?php echo $this->_tpl_vars['forms']['u_time']; ?>
" />
	<?php if (( ! empty ( $this->_tpl_vars['edit_msg'] ) )): ?><div  class="errmsg"><?php echo $this->_tpl_vars['edit_msg']; ?>
&nbsp;&nbsp; </div> <?php endif; ?><div  id="submsgid" class="errmsg"><?php echo $this->_tpl_vars['errmsg']; ?>
 </div>
</p>
 <table class="formTable" style="width:100%" >
 <tr><th colspan='3'>見込</th><th colspan='3'>計画</th><th colspan='3'>前年比</th></tr>
 <tr><td align="center">チラシ</td><td align="center">地域広告</td><td align="center">見込計</td>
 <td align="center">計画計</td><td align="center">計画差異</td><td align="center">計画比</td>
 <td align="center">前年計</td><td align="center">前年差異</td><td align="center">前年比</td></tr>
 <tr><td align="right"><span id="su_qira">0</span></td><td align="right"><span id="su_area"></span></td><td align="right"><span id="su_all">0</span></td>
 <td align="right"><span id="su_psum">0</span></td><td align="right"><span id="su_pdec">0</span></td><td align="right"><span id="su_pper">0</span></td>
 <td align="right"><span id="su_lsum">0</span></td><td align="right"><span id="su_ldec">0</span></td><td align="right"><span id="su_lper">0</span></td></tr>
 </table><br>
 <div class="all_div" >
 <table style="table-layout:fixed;word-wrap:break-word;word-break:break-all;" >
 <tr><td style="width:23px;height:80px"></td>
 <td style="width:130px;height:80px;"></td>
 <td style="width:180px;text-align:center"><select  id="disp_td" name="disp_td"><?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['disp_td']), $this);?>
</select></td>
 <td style="width:28px"></td>
 <td style="width:70px"></td>
 </tr>
 </table>
 <div>
 <div class="l_head_div" id ="lhdiv">
 <table class="formTable" id = "head_tab_l" style="table-layout:fixed;word-wrap:break-word;word-break:break-all;" >
 <tr><th style="width:23px;height:80px">合<br/>同</th>
 <th style="width:130px;height:80px">店舗コード<br/>店舗名<br/>AJAエリア </th>
  <th style="width:18px"></th>
 <th style="width:60px">見込</th>
  <th style="width:18px"></th>
 <th style="width:60px">計画</th>
  <th style="width:18px"></th>
 <th style="width:60px">前年</th>
 <th style="width:18px"></th>
 <th style="width:70px">前年<br>売上高<br>実績</th>
 </tr>
 </table>
 </div>
 <div class="r_head_div" id ="rhdiv" onscroll="document.getElementById('rdiv').scrollLeft=this.scrollLeft;">
 <table class="formTable" id = "head_tab_r"  style="width:<?php echo $this->_tpl_vars['fw']['tabw']; ?>
px">
<tr style="height:26px;">
 <th style="height:26px;" colspan="<?php echo $this->_tpl_vars['fw']['colnums']; ?>
" > 通常チラシ&nbsp;<a href="javascript:jumpl(<?php echo $this->_tpl_vars['fw']['cw']; ?>
);"> >> </a></th>
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
<th colspan="6" ><a href="javascript:jumpl(<?php echo $this->_tpl_vars['cv']['tol']; ?>
);"> << </a>&nbsp;&nbsp; <?php echo $this->_tpl_vars['cv']['name']; ?>
<?php if ($this->_tpl_vars['ck'] != 5): ?> &nbsp;&nbsp;<a href="javascript:jumpl(<?php echo $this->_tpl_vars['cv']['tor']; ?>
);"> >> </a><?php endif; ?></th>
<?php endforeach; endif; unset($_from); ?>
 </tr>
 <tr style="height:26px;">
 <th rowspan="2" style="width:<?php echo $this->_tpl_vars['fw']['title']; ?>
px;">セールタイトル(マップNo)<br>[]内は前年</th>
 <th rowspan="2"  style="width:<?php echo $this->_tpl_vars['fw']['size']; ?>
px;"></th>
 <th colspan="3" style="height:26px;">前年</th>
 <th colspan="3" style="height:26px;">本年</th>
<?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
 <th colspan="3" style="height:26px;"><?php echo $this->_tpl_vars['cv']['name']; ?>
</th>
<?php endforeach; endif; unset($_from); ?>
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
 <th rowspan="2" style="width:<?php echo $this->_tpl_vars['fw']['title']; ?>
px;">セールタイトル(マップNo)<br>[]内は前年</th> <th rowspan="2" style="width:<?php echo $this->_tpl_vars['fw']['size']; ?>
px;"></th>
 <th colspan="2" style="height:26px;">前年</th><th colspan="2">本年</th>
<?php endforeach; endif; unset($_from); ?>
 </tr>
 <tr  style="height:26px;">
 <th style="height:26px;width:<?php echo $this->_tpl_vars['fw']['sample']; ?>
px;">見本</th>
 <th style="height:26px;width:<?php echo $this->_tpl_vars['fw']['num']; ?>
px;">部数</th>
 <th style="width:<?php echo $this->_tpl_vars['fw']['pattern']; ?>
px;">パターン</th>
 <th style="height:26px;width:<?php echo $this->_tpl_vars['fw']['sample']; ?>
px;">見本</th>
 <th style="width:<?php echo $this->_tpl_vars['fw']['num']; ?>
px;">部数</th>
 <th style="width:<?php echo $this->_tpl_vars['fw']['pattern']; ?>
px;">パターン</th>
<?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
 <th style="height:26px;width:<?php echo $this->_tpl_vars['fw']['sample']; ?>
px;">見本</th>
 <th style="width:<?php echo $this->_tpl_vars['fw']['num']; ?>
px;">部数</th>
 <th style="width:<?php echo $this->_tpl_vars['fw']['pattern']; ?>
px;">パターン</th>
<?php endforeach; endif; unset($_from); ?>
 <?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
<th style="width:<?php echo $this->_tpl_vars['fw']['num']; ?>
px;height:26px;">部数</th><th style="width:<?php echo $this->_tpl_vars['fw']['pattern']; ?>
px;">パターン</th> 
<th style="width:<?php echo $this->_tpl_vars['fw']['num']; ?>
px;">部数</th><th style="width:<?php echo $this->_tpl_vars['fw']['pattern']; ?>
px;">パターン</th>
<?php endforeach; endif; unset($_from); ?>
 </tr>
	</table>
 </div>
 <div class="l_div" id="ldiv" onscroll="document.getElementById('rdiv').scrollTop=this.scrollTop;"> 
 <table class="formTable" id = "1_tab_l" style="table-layout:fixed;word-wrap:break-word;word-break:break-all;" >
 <tr style="height:1px;">
 <th style="width:23px;height:1px"></th>
 <th style="width:130px;height:1px"></th>
 <th style="width:18px"></th>
 <th style="width:60px"></th>
 <th style="width:18px"></th>
 <th style="width:60px"></th>
 <th style="width:18px"></th>
 <th style="width:60px"></th>
 <th style="width:18px"></th>
 <th style="width:70px"></th>
 </tr>
 <?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kk'] => $this->_tpl_vars['vv']):
        $this->_foreach['member']['iteration']++;
?>
 <?php $this->assign('i', ($this->_foreach['member']['iteration']-1)); ?>
  <tr>
  <td rowspan=3><input type="text" name="congruent_ins[]" class="dtext" value="<?php echo $this->_tpl_vars['vv']['congruent_ins']; ?>
" readonly/></td>
	<td rowspan=3> 
	<input type="text" id="sp<?php echo $this->_tpl_vars['i']; ?>
"  name="shop_cd[]"     class="dtext" value="<?php echo $this->_tpl_vars['vv']['shop_cd']; ?>
" readonly/></br>
	<input type="text" name="shop_name[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['shop_name']; ?>
" readonly/></br>
	(<?php echo $this->_tpl_vars['vv']['user_name']; ?>
)<!-- <br>(<?php echo $this->_tpl_vars['vv']['zuser_name']; ?>
) --><br>
	<?php echo $this->_tpl_vars['vv']['sale']; ?>

	</td>
	<td align=center>計</td><td> <span id="zkm1_<?php echo $this->_tpl_vars['i']; ?>
" class = "manage"><?php echo $this->_tpl_vars['vv']['now_qua']; ?>
</span><span id="zkc1_<?php echo $this->_tpl_vars['i']; ?>
" class = "cost"></span><span  id="zkb1_<?php echo $this->_tpl_vars['i']; ?>
" class="benefit">0</span> </td>
	<td align=center>計</td><td> <span id="zkm2_<?php echo $this->_tpl_vars['i']; ?>
" class = "manage"><?php echo $this->_tpl_vars['vv']['plane_qua']; ?>
</span><span id="zkc2_<?php echo $this->_tpl_vars['i']; ?>
" class = "plco cost"><?php echo $this->_tpl_vars['vv']['plane_cost']; ?>
</span><span  id="zkb2_<?php echo $this->_tpl_vars['i']; ?>
" class="benefit">0</span> </td>
	<td align=center>計</td><td> <span id="zkm3_<?php echo $this->_tpl_vars['i']; ?>
" class = "manage"><?php echo $this->_tpl_vars['vv']['last_qua']; ?>
</span><span id="zkc3_<?php echo $this->_tpl_vars['i']; ?>
" class = "lsco cost"><?php echo $this->_tpl_vars['vv']['last_cost']; ?>
</span><span  id="zkb3_<?php echo $this->_tpl_vars['i']; ?>
" class="benefit">0</span> </td>
	<td align=center>土</td><td><input type="text"  name="ly_sale6[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lyear_sale6']; ?>
" readonly/></td>
	</tr><tr>
	<td align=center>チ</td><td> <span id="zqm1_<?php echo $this->_tpl_vars['i']; ?>
" class = "manage"></span><span id="zqc1_<?php echo $this->_tpl_vars['i']; ?>
" class = "qira cost"></span><span id="zqb1_<?php echo $this->_tpl_vars['i']; ?>
" class="benefit"></span> </td>
	<td align=center>差</td><td> <span id="zqm2_<?php echo $this->_tpl_vars['i']; ?>
" class = "manage"></span><span id="zqc2_<?php echo $this->_tpl_vars['i']; ?>
" class = "cost"></span><span id="zqb2_<?php echo $this->_tpl_vars['i']; ?>
" class="benefit"></span> </td>
	<td align=center>差</td><td> <span id="zqm3_<?php echo $this->_tpl_vars['i']; ?>
" class = "manage"></span><span id="zqc3_<?php echo $this->_tpl_vars['i']; ?>
" class = "cost"></span><span id="zqb3_<?php echo $this->_tpl_vars['i']; ?>
" class="benefit"></span> </td>
	<td align=center>日</td><td><input type="text"  name="ly_sale7[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lyear_sale7']; ?>
" readonly/></td>
	</tr><tr>
	<td align=center>地</td><td> <span id="zam1_<?php echo $this->_tpl_vars['i']; ?>
" class = "manage"></span><span  id="zac1_<?php echo $this->_tpl_vars['i']; ?>
" class = "qiar cost"><?php echo $this->_tpl_vars['vv']['loc_cost']; ?>
</span><span  id="zab1_<?php echo $this->_tpl_vars['i']; ?>
" class="benefit"></span> </td>
	<td align=center>比</td><td> <span id="zam2_<?php echo $this->_tpl_vars['i']; ?>
" class = "manage"></span><span  id="zac2_<?php echo $this->_tpl_vars['i']; ?>
" class = "cost"></span><span  id="zab2_<?php echo $this->_tpl_vars['i']; ?>
" class="benefit"></span> </td>
	<td align=center>比</td><td> <span id="zam3_<?php echo $this->_tpl_vars['i']; ?>
" class = "manage"></span><span  id="zac3_<?php echo $this->_tpl_vars['i']; ?>
" class = "cost"></span><span  id="zab3_<?php echo $this->_tpl_vars['i']; ?>
" class="benefit"></span> </td>
	<td align=center>計</td><td><input type="text"  name="ly_sale[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lyear_sale']; ?>
" readonly/></td>
	</tr>
<?php endforeach; endif; unset($_from); ?>
 </table>
 </div>
<div class="r_div" id="rdiv" onscroll="document.getElementById('rhdiv').scrollLeft=this.scrollLeft;document.getElementById('ldiv').scrollTop=this.scrollTop;hpa();"> 
	<table class="formTable" id = "1_tab_r"  style="table-layout:fixed;word-wrap:break-word;word-break:break-all;width:<?php echo $this->_tpl_vars['fw']['tabw']; ?>
px">
	<tr style="height:1px;">
		<th style="height:1px;width:<?php echo $this->_tpl_vars['fw']['title']; ?>
px;"></th>
		<th style="width:<?php echo $this->_tpl_vars['fw']['size']; ?>
px;"></th>
		<th style="width:<?php echo $this->_tpl_vars['fw']['sample']; ?>
px;"></th><th style="width:<?php echo $this->_tpl_vars['fw']['num']; ?>
px;"></th><th style="width:<?php echo $this->_tpl_vars['fw']['pattern']; ?>
px;"></th>
		<th style="width:<?php echo $this->_tpl_vars['fw']['sample']; ?>
px;"></th><th style="width:<?php echo $this->_tpl_vars['fw']['num']; ?>
px;"></th><th style="width:<?php echo $this->_tpl_vars['fw']['pattern']; ?>
px;"></th>
<?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<th style="width:<?php echo $this->_tpl_vars['fw']['sample']; ?>
px;"></th><th style="width:<?php echo $this->_tpl_vars['fw']['num']; ?>
px;"></th><th style="width:<?php echo $this->_tpl_vars['fw']['pattern']; ?>
px;"></th>
<?php endforeach; endif; unset($_from); ?>
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<th style="width:<?php echo $this->_tpl_vars['fw']['title']; ?>
px;"></th><th style="width:<?php echo $this->_tpl_vars['fw']['size']; ?>
px;">
		</th><th style="width:<?php echo $this->_tpl_vars['fw']['num']; ?>
px;"></th><th style="width:<?php echo $this->_tpl_vars['fw']['pattern']; ?>
px;"></th> <th style="width:<?php echo $this->_tpl_vars['fw']['num']; ?>
px;"></th><th style="width:<?php echo $this->_tpl_vars['fw']['pattern']; ?>
px;"></th>
<?php endforeach; endif; unset($_from); ?>
		</tr>
<?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['member'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['member']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['kk'] => $this->_tpl_vars['vv']):
        $this->_foreach['member']['iteration']++;
?>
 <?php $this->assign('i', ($this->_foreach['member']['iteration']-1)); ?>
	<tr>
	<td rowspan='3'>
	<!--<input type="text"  name="ltitle_cd[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['ltitle_cd']; ?>
" readonly/> -->
	<?php echo $this->_tpl_vars['vv']['ltitle_cd']; ?>
<br>
<?php if ($this->_tpl_vars['vv']['mark'] != '9'): ?>	
<select  id="tx_<?php echo $this->_tpl_vars['i']; ?>
" name="title_cd[]" class="titlebase"  <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="t_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> > <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['title'],'selected' => $this->_tpl_vars['vv']['title_cd']), $this);?>
</select>
<?php else: ?>
<input type="hidden"  name="title_cd[]"  class="t_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" value="<?php echo $this->_tpl_vars['vv']['title_cd']; ?>
" />
<input type="text"  name="title_nm[]"  class="dtext tm_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
"  <?php if ($this->_tpl_vars['vv']['title_cd']): ?> value="<?php echo $this->_tpl_vars['title'][$this->_tpl_vars['vv']['title_cd']]; ?>
 <?php endif; ?>" readonly/>
<?php endif; ?><br>
  <span id="mps_<?php echo $this->_tpl_vars['i']; ?>
" <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="mps_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> > <?php if ($this->_tpl_vars['vv']['mpno']): ?> ( <?php echo $this->_tpl_vars['vv']['mp']; ?>
 <?php echo $this->_tpl_vars['vv']['isirgyu']; ?>
&nbsp; <?php echo $this->_tpl_vars['vv']['mpno']; ?>
 )<?php endif; ?> </span>
	<input type="hidden" id="mpno_<?php echo $this->_tpl_vars['i']; ?>
"  name="mpno[]" value="<?php echo $this->_tpl_vars['vv']['mpno']; ?>
"  <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="mp_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
"	<?php endif; ?>/>
	<input type="hidden" id="isirgyu_<?php echo $this->_tpl_vars['i']; ?>
"  name="isirgyu[]" value="<?php echo $this->_tpl_vars['vv']['isirgyu']; ?>
" <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="is_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
"	<?php endif; ?> />
	<!--<br><?php echo $this->_tpl_vars['vv']['vtype']; ?>
版下タイプ"  版下タイプ -->
	</td>
	<td align=center>B2</td>
	<td><input type="text"  name="lsmpc_b2[]"  class="dtext" value="<?php echo $this->_tpl_vars['vv']['lsmpc_b2']; ?>
" readonly/></td>
	<td><input type="text"  name="lnpc_b2[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lnpc_b2']; ?>
"  readonly/></td>
	<td><input type="text"  name="lpc_b2[]"    class="dtext" value="<?php echo $this->_tpl_vars['vv']['lpc_b2']; ?>
"   readonly/></td>
	
	<td><input type="text"  id="smpc_b2_<?php echo $this->_tpl_vars['i']; ?>
"   name="smpc_b2[]"  class="<?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?>dtext mc2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
<?php else: ?>celltext<?php endif; ?>" <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="mc2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> value="<?php echo $this->_tpl_vars['vv']['smpc_b2']; ?>
" /></td>
	<td><input type="text"  id="npc_b2_<?php echo $this->_tpl_vars['i']; ?>
"    name="npc_b2[]"   class="<?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?>dtext nc2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
<?php else: ?>celltext<?php endif; ?>" <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="nc2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?>  value="<?php echo $this->_tpl_vars['vv']['npc_b2']; ?>
" /></td>
	<td><input type="text"  id="nmpc_b2_<?php echo $this->_tpl_vars['i']; ?>
"    name="nmpc_b2[]"  <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="pm2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
 dtext" <?php else: ?> class="pnm" <?php endif; ?>  value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['vv']['pc_b2']]; ?>
" readonly/>
	<input type="hidden"  id="pc_b2_<?php echo $this->_tpl_vars['i']; ?>
"  name="pc_b2[]"   value="<?php echo $this->_tpl_vars['vv']['pc_b2']; ?>
"  <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="p2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> /></td>
<?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
 <?php $this->assign('jj', ($this->_foreach['csets']['iteration']-1)); ?>
		<td><input type="text"  id="<?php echo $this->_tpl_vars['cv']['smpc_b2']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="<?php echo $this->_tpl_vars['cv']['smpc_b2']; ?>
[]"   class="<?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?>dtext wmc2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
<?php else: ?>celltext<?php endif; ?>" <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="wmc2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['smpc_b2']]; ?>
" /></td>
		<td><input type="text"  id="<?php echo $this->_tpl_vars['cv']['npc_b2']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
"  name="<?php echo $this->_tpl_vars['cv']['npc_b2']; ?>
[]"   class="<?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?>dtext wnc2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
<?php else: ?>celltext<?php endif; ?>" <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="wnc2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['npc_b2']]; ?>
" /></td>
		 <?php $this->assign('patt_cd', $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['pc_b2']]); ?>
		<td><input type="text"    id="nm<?php echo $this->_tpl_vars['cv']['pc_b2']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="nm<?php echo $this->_tpl_vars['cv']['pc_b2']; ?>
[]"    <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="w2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="pmw2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
 dtext" <?php else: ?> class="pnm" <?php endif; ?> value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['patt_cd']]; ?>
" readonly/>
		<input type="hidden"  id="<?php echo $this->_tpl_vars['cv']['pc_b2']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
"  name="<?php echo $this->_tpl_vars['cv']['pc_b2']; ?>
[]"  value="<?php echo $this->_tpl_vars['patt_cd']; ?>
" <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="pw2_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> /></td>
<?php endforeach; endif; unset($_from); ?>
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
 <?php $this->assign('jj', ($this->_foreach['csets']['iteration']-1)); ?>
		<td rowspan='3'><?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['ltitle_cd']]; ?>
<br> <?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['title_cd']]; ?>
<?php if ($this->_tpl_vars['vv'][$this->_tpl_vars['cv']['mpno']]): ?></br> ( <?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['mp']]; ?>
  <?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['isirgyu']]; ?>
&nbsp; <?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['mpno']]; ?>
 )<?php endif; ?></td>
		<td align=center>B2</td>
		<td><input type="text"  name="<?php echo $this->_tpl_vars['cv']['lnpc_b2']; ?>
[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['lnpc_b2']]; ?>
" readonly /></td>
		<td><input type="text"  name="<?php echo $this->_tpl_vars['cv']['lpc_b2']; ?>
[]"    class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['lpc_b2']]; ?>
"  readonly /></td>
		<td><?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['npc_b2']]; ?>
</td>
		 <?php $this->assign('patt_cd', $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['pc_b2']]); ?>
		 <td><?php echo $this->_tpl_vars['areapattern'][$this->_tpl_vars['patt_cd']]; ?>
</td>
<?php endforeach; endif; unset($_from); ?>
	</tr><tr>
		<td align=center>B3</td>
		<td><input type="text"  name="lsmpc_b3[]"  class="dtext" value="<?php echo $this->_tpl_vars['vv']['lsmpc_b3']; ?>
" readonly/></td>
		<td><input type="text"  name="lnpc_b3[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lnpc_b3']; ?>
" readonly/></td>
		<td><input type="text"  name="lpc_b3[]"    class="dtext" value="<?php echo $this->_tpl_vars['vv']['lpc_b3']; ?>
" readonly/></td>
		<td><input type="text"  id="smpc_b3_<?php echo $this->_tpl_vars['i']; ?>
" name="smpc_b3[]"  class="<?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?>dtext mc3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
<?php else: ?>celltext<?php endif; ?>" <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="mc3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> value="<?php echo $this->_tpl_vars['vv']['smpc_b3']; ?>
" /></td>
		<td><input type="text"  id="npc_b3_<?php echo $this->_tpl_vars['i']; ?>
" name="npc_b3[]"   class="<?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?>dtext nc3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
<?php else: ?>celltext<?php endif; ?>" <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="nc3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> value="<?php echo $this->_tpl_vars['vv']['npc_b3']; ?>
" /></td>
		<td><input type="text"  id="nmpc_b3_<?php echo $this->_tpl_vars['i']; ?>
" name="nmpc_b3[]"    <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="pm3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
 dtext" <?php else: ?> class="pnm" <?php endif; ?> value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['vv']['pc_b3']]; ?>
" readonly/>
		<input type="hidden"  id="pc_b3_<?php echo $this->_tpl_vars['i']; ?>
"  name="pc_b3[]"   value="<?php echo $this->_tpl_vars['vv']['pc_b3']; ?>
"  <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="p3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?>/></td>
 <?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<!--<td align=center>B3</td>-->
		<td><input type="text"  id="<?php echo $this->_tpl_vars['cv']['smpc_b3']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="<?php echo $this->_tpl_vars['cv']['smpc_b3']; ?>
[]"  class="<?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?>dtext wmc3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
<?php else: ?>celltext<?php endif; ?>" <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="wmc3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['smpc_b3']]; ?>
" /></td>
		<td><input type="text"  id="<?php echo $this->_tpl_vars['cv']['npc_b3']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="<?php echo $this->_tpl_vars['cv']['npc_b3']; ?>
[]"    class="<?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?>dtext wnc3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
<?php else: ?>celltext<?php endif; ?>" <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="wnc3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['npc_b3']]; ?>
" /></td>
		 <?php $this->assign('patt_cd', $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['pc_b3']]); ?>
		<td><input type="text"    id="nm<?php echo $this->_tpl_vars['cv']['pc_b3']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="nm<?php echo $this->_tpl_vars['cv']['pc_b3']; ?>
[]"    <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="w3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="pmw3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
 dtext" <?php else: ?> class="pnm" <?php endif; ?> value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['patt_cd']]; ?>
" readonly/>
		<input type="hidden"  id="<?php echo $this->_tpl_vars['cv']['pc_b3']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
"  name="<?php echo $this->_tpl_vars['cv']['pc_b3']; ?>
[]"  value="<?php echo $this->_tpl_vars['patt_cd']; ?>
" <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="pw3_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?>/></td>
 <?php endforeach; endif; unset($_from); ?>
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<td align=center>B3</td>
		<td><input type="text"  name="<?php echo $this->_tpl_vars['cv']['lnpc_b3']; ?>
[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['lnpc_b3']]; ?>
" readonly /></td>
		<td><input type="text"  name="<?php echo $this->_tpl_vars['cv']['lpc_b3']; ?>
[]"    class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['lpc_b3']]; ?>
"  readonly /></td>
		<td><?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['npc_b3']]; ?>
</td>
		 <?php $this->assign('patt_cd', $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['pc_b3']]); ?>
		<td><?php echo $this->_tpl_vars['areapattern'][$this->_tpl_vars['patt_cd']]; ?>
</td>
<?php endforeach; endif; unset($_from); ?>
	</tr><tr>
		<td align=center>B4</td>
		<td><input type="text"  name="lsmpc_b4[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lsmpc_b4']; ?>
" readonly/></td>
		<td><input type="text"  name="lnpc_b4[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lnpc_b4']; ?>
" readonly/></td>
		<td><input type="text"  name="lpc_b4[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv']['lpc_b4']; ?>
" readonly/></td>
		<td><input type="text"  id="smpc_b4_<?php echo $this->_tpl_vars['i']; ?>
" name="smpc_b4[]"   class="<?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?>dtext mc4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
<?php else: ?>celltext<?php endif; ?>" <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="mc4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> value="<?php echo $this->_tpl_vars['vv']['smpc_b4']; ?>
" /></td>
		<td><input type="text"  id="npc_b4_<?php echo $this->_tpl_vars['i']; ?>
" name="npc_b4[]"   class="<?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?>dtext nc4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
<?php else: ?>celltext<?php endif; ?>" <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="nc4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> value="<?php echo $this->_tpl_vars['vv']['npc_b4']; ?>
" /></td>
		<td><input type="text"  id="nmpc_b4_<?php echo $this->_tpl_vars['i']; ?>
" name="nmpc_b4[]"    <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="pm4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
 dtext" <?php else: ?> class="pnm" <?php endif; ?> value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['vv']['pc_b4']]; ?>
" />
		<input type="hidden"  id="pc_b4_<?php echo $this->_tpl_vars['i']; ?>
"  name="pc_b4[]"   value="<?php echo $this->_tpl_vars['vv']['pc_b4']; ?>
" <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="p4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?>/></td>
 <?php $_from = $this->_tpl_vars['cell_wsets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<!-- <td align=center>B4</td> -->
		<td><input type="text"  id="<?php echo $this->_tpl_vars['cv']['smpc_b4']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="<?php echo $this->_tpl_vars['cv']['smpc_b4']; ?>
[]"   class="<?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?>dtext wmc4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
<?php else: ?>celltext<?php endif; ?>" <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="wmc4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['smpc_b4']]; ?>
" /></td>
		<td><input type="text"  id="<?php echo $this->_tpl_vars['cv']['npc_b4']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="<?php echo $this->_tpl_vars['cv']['npc_b4']; ?>
[]"  class="<?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?>dtext wnc4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
<?php else: ?>celltext<?php endif; ?>" <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="wnc4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['npc_b4']]; ?>
" /></td>
		 <?php $this->assign('patt_cd', $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['pc_b4']]); ?>
		<td><input type="text"    id="nm<?php echo $this->_tpl_vars['cv']['pc_b4']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
" name="nm<?php echo $this->_tpl_vars['cv']['pc_b4']; ?>
[]"    <?php if ($this->_tpl_vars['vv']['mark'] == '1'): ?> ref="w4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?> <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="pmw4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
 dtext" <?php else: ?> class="pnm" <?php endif; ?> value="<?php echo $this->_tpl_vars['pattern'][$this->_tpl_vars['patt_cd']]; ?>
" readonly/>
		<input type="hidden"  id="<?php echo $this->_tpl_vars['cv']['pc_b4']; ?>
_<?php echo $this->_tpl_vars['i']; ?>
"  name="<?php echo $this->_tpl_vars['cv']['pc_b4']; ?>
[]"  value="<?php echo $this->_tpl_vars['patt_cd']; ?>
" <?php if ($this->_tpl_vars['vv']['mark'] == '9'): ?> class="pw4_<?php echo $this->_tpl_vars['vv']['group_no']; ?>
" <?php endif; ?>/></td>
 <?php endforeach; endif; unset($_from); ?>
<?php $_from = $this->_tpl_vars['cell_losets']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['ck'] => $this->_tpl_vars['cv']):
        $this->_foreach['csets']['iteration']++;
?>
		<td align=center>B4</td>
		<td><input type="text"  name="<?php echo $this->_tpl_vars['cv']['lnpc_b4']; ?>
[]"   class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['lnpc_b4']]; ?>
" readonly /></td>
		<td><input type="text"  name="<?php echo $this->_tpl_vars['cv']['lpc_b4']; ?>
[]"    class="dtext" value="<?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['lpc_b4']]; ?>
"  readonly /></td>
		<td><?php echo $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['npc_b4']]; ?>
</td>
		 <?php $this->assign('patt_cd', $this->_tpl_vars['vv'][$this->_tpl_vars['cv']['pc_b4']]); ?>
		<td><?php echo $this->_tpl_vars['areapattern'][$this->_tpl_vars['patt_cd']]; ?>
</td>
<?php endforeach; endif; unset($_from); ?>
	</tr>
<?php endforeach; endif; unset($_from); ?>
	</table>
</div>
<div class = "all_div">
	<p  class="button" >
		<button type="button" class="btn_save"  class="submit btnleft"><span>更新</span></button>
	</p>
	<input type="hidden" name="mode" value="" />
</div>
</form>
<?php endif; ?>

<?php if ($this->_tpl_vars['phase'] == 'complete'): ?>
	<p class="message"><?php echo $this->_tpl_vars['message']; ?>
</p>
	<ul>
		<li>>> <a href="tmoncell_index.php?hist=2">一覧ページに戻る</a></li>
		<li>>> <a href="tmoncell_formf.php?mm=<?php echo $this->_tpl_vars['forms']['map_no']; ?>
&ww=<?php echo $this->_tpl_vars['forms']['matrix_cd']; ?>
">更新</a></li>
	</ul>
<?php endif; ?>
		</div>
		</div>
 <div id="pop_cp" style = "width:380px; height:300px;background:#eeeecc;  overflow-y:scroll;display:none" > </div>
   <div id="pop_tp" style = "display:none" >
 <table width="98%" border="0" cellspacing="2" cellpadding="0" style="font-size:12px; line-height:17px;">
  <tr><td align="right" colspan=4><button type="button" onclick="javascript:spa('','')" ><span>クリア</span></button>&nbsp;&nbsp;</td></tr>
 <?php $_from = $this->_tpl_vars['allpattern']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['cs'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['cs']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['cs']['iteration']++;
?>
 <?php if (( $this->_tpl_vars['k'] == 1 ) || ( $this->_tpl_vars['k'] == 4 ) || ( $this->_tpl_vars['k'] == 5 )): ?> 
 <tr><td align="left"><b><?php echo $this->_tpl_vars['patternflags'][$this->_tpl_vars['k']]; ?>
</b></td></tr>
 <tr>
	 <?php $_from = $this->_tpl_vars['v']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['pk'] => $this->_tpl_vars['pv']):
        $this->_foreach['csets']['iteration']++;
?>
	 <td align="left">
	  <a href="javascript:void(0)" onclick="javascript:spa('<?php echo $this->_tpl_vars['pk']; ?>
','<?php echo $this->_tpl_vars['pv']; ?>
')" > <?php echo $this->_tpl_vars['pv']; ?>
 </a>
	   </td>
	    <?php if (($this->_foreach['csets']['iteration']-1) % 4 == 3): ?></tr><tr><?php endif; ?>
	 <?php endforeach; endif; unset($_from); ?>
  <?php endif; ?>
 <?php endforeach; endif; unset($_from); ?>
 </table>
 </div>
 <!--  
  <div id="pop_qp"  style = "display:none" >
 <table width="98%" border="0" cellspacing="2" cellpadding="0" style="font-size:12px; line-height:17px;">
  <tr><td align="right" colspan=4><button type="button" onclick="javascript:spa('','')" ><span>クリア</span></button>&nbsp;&nbsp;</td></tr>
 <?php $_from = $this->_tpl_vars['allpattern']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['cs'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['cs']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['cs']['iteration']++;
?>
 <?php if (( $this->_tpl_vars['k'] == 2 ) || ( $this->_tpl_vars['k'] == 3 ) || ( $this->_tpl_vars['k'] == 4 )): ?> 
	 <tr><td align="left"><b><?php echo $this->_tpl_vars['patternflags'][$this->_tpl_vars['k']]; ?>
</b></td></tr>
	 <tr>
	 <?php $_from = $this->_tpl_vars['v']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['csets'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['csets']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['pk'] => $this->_tpl_vars['pv']):
        $this->_foreach['csets']['iteration']++;
?>
	 	<td align="left">
	  <a href="javascript:void(0)" onclick="javascript:spa('<?php echo $this->_tpl_vars['pk']; ?>
','<?php echo $this->_tpl_vars['pv']; ?>
')" > <?php echo $this->_tpl_vars['pv']; ?>
 </a>
	   </td>
	    <?php if (($this->_foreach['csets']['iteration']-1) % 4 == 3): ?></tr><tr><?php endif; ?>
	 <?php endforeach; endif; unset($_from); ?>
  <?php endif; ?>
 <?php endforeach; endif; unset($_from); ?>
 </table>
 </div>
 -->
 <iframe id='i_frame' name='i_frame' width='800px' height='400px' ></iframe>
<!-- width='1px' height='1px' style='display:none'  width='800px' height='400px'-->
<div class = "all_div" ><?php echo $this->_tpl_vars['footer']; ?>
</div>
	</body>
</html>